package com.gomo;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;

import com.gomo.R;

public class MyTabActivity extends TabActivity {

	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_tab);

		Resources res = getResources(); // Resource object to get Drawables
		TabHost tabHost = getTabHost(); // The activity TabHost
		TabHost.TabSpec spec; // Resusable TabSpec for each tab
		Intent intent; // Reusable Intent for each tab

		
		intent = new Intent().setClass(this, LoginActivity.class);
		spec = tabHost.newTabSpec("login")
				.setIndicator("Login", res.getDrawable(R.drawable.ic_tab_login))
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, SignupActivity.class);
		spec = tabHost
				.newTabSpec("signup")
				.setIndicator("Sign Up", res.getDrawable(R.drawable.ic_tab_signup))
				.setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);
		// setTabColor(tabHost);

	}

}
